#if !defined(LIST_H)
#define LIST_H

#define PI   3.1415926535897932385

#include "hypersphere.h"
# include <iostream>
#include <vector>
using namespace std;
# include "nr_c/nr.h"
# include "Tracker.h"

class List
{

public :
	List(int listSize);
	virtual ~List() { }

  virtual void add(const Hypersphere& h);
  virtual void add(int numDimension, double *solution, double radius);
  virtual void replace(int numDimension, double *solution, double radius, double funcval);

  virtual bool isInList(double *solution);
  virtual bool isInList(const vector<double> &solution);

protected:
  vector<Hypersphere> m_list;

  const int m_MaxSize;

  int m_numInList;  // number of elements in m_list, but this number
                    // can never be higher than m_MaxSize
  int whichToOverWrite; // point to element which will be overwritten 
                        // when the add() is called
};

#endif